<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 数学</title>
</head>
<body>
<h2>Math.floor()</h2>
<p>Math.floor(x) 的返回值是 x 下舍入最接近的整数：</p>

<p id="demo"></p>

<script>
  document.getElementById("demo").innerHTML = Math.floor(4.7);
</script>
</body>
</html>

<!--
返回结果：4
-->